//
//  QXToast.m
//  DuckAndDoc
//
//  Created by 蓝水软件 on 2017/5/9.
//  Copyright © 2017年 苏州蓝水有限公司. All rights reserved.
//

#import "QXToast.h"

@implementation QXToast
+ (void)showTopWithText:(NSString *)text{
    [QXToast showTextFrom:CRToastAnimationDirectionLeft text:text backColor:[UIColor flatBlackColor] textColor:[UIColor flatWhiteColor]];
}

+ (void)showTextFrom:(CRToastAnimationDirection) AnimationDirection text:(NSString *)text backColor:(UIColor *)backColor textColor:(UIColor *)textColor{
    NSDictionary *options = @{
                              kCRToastTextKey : text,
                              kCRToastTextAlignmentKey : @(NSTextAlignmentCenter),
                              kCRToastBackgroundColorKey : [UIColor flatBlackColor],
                              kCRToastAnimationInTypeKey : @(CRToastAnimationTypeSpring),
                              kCRToastAnimationOutTypeKey : @(CRToastAnimationTypeSpring),
                              kCRToastAnimationInDirectionKey : @(AnimationDirection),
                              kCRToastAnimationOutDirectionKey : @(AnimationDirection),
                              kCRToastNotificationTypeKey : @(CRToastTypeNavigationBar),
                              kCRToastFontKey: [UIFont systemFontOfSize:12],
                              };
    [CRToastManager showNotificationWithOptions:options
                                completionBlock:nil];
}
@end
